Skip all LayoutChild when testing
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 26 Mar 2019 18:05:48 +0000 (18:05 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 26 Mar 2019 18:46:55 +0000 (18:46 +0000)
GtkLayoutChild instances are created on demand once we have a widget, a
GtkLayoutManager, and a child widget. This makes testing their creation
fairly tricky.

Let's skip them, for the time being.

testsuite/gtk/defaultvalue.c
testsuite/gtk/notify.c
testsuite/gtk/objects-finalize.c

index 34c9638ceacb3408c5dbfdb5e737c03226590628..6404cda1ae1b98f50a12cf51c975c1351c8af5bd 100644 (file)
@@ -77,6 +77,7 @@ test_type (gconstpointer data)
   /* These can't be freely constructed/destroyed */
   if (g_type_is_a (type, GTK_TYPE_APPLICATION) ||
       g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) ||
+      g_type_is_a (type, GTK_TYPE_LAYOUT_CHILD) ||
 #ifdef G_OS_UNIX
       g_type_is_a (type, GTK_TYPE_PRINT_JOB) ||
 #endif
index f36c8f43e73cfd15e345162ef02a1a05a5d46e0d..e1622059da08a696463e1822288967a7e9a0bcb4 100644 (file)
@@ -370,6 +370,7 @@ test_type (gconstpointer data)
   /* These can't be freely constructed/destroyed */
   if (g_type_is_a (type, GTK_TYPE_APPLICATION) ||
       g_type_is_a (type, GDK_TYPE_PIXBUF_LOADER) ||
+      g_type_is_a (type, GTK_TYPE_LAYOUT_CHILD) ||
 #ifdef G_OS_UNIX
       g_type_is_a (type, GTK_TYPE_PRINT_JOB) ||
 #endif
index 3e64c2ff228d2a5d95b89c27e3604812b615dd71..b43ab812ee669235577cb4222a7c385f69ffd76a 100644 (file)
@@ -72,6 +72,11 @@ test_finalize_object (gconstpointer data)
                              NULL);
       g_object_unref (list_store);
     }
+  else if (g_type_is_a (test_type, GTK_TYPE_LAYOUT_CHILD))
+    {
+      g_test_skip ("Skipping GtkLayoutChild type");
+      return;
+    }
   else
     object = g_object_new (test_type, NULL);
   g_assert (G_IS_OBJECT (object));